def server_id():
    '''
    dev_ip 开发环境的服务器ip地址
    sit_ip 测试环境的服务器ip地址
    :return: xxx_ip
    '''
    # dev_ip = 'http://127.0.0.1:8080'
    # sit_ip = 'http://192.168.1.103:8080'
    #环境、地址保存在字典里
    server_address = {
        'dev_ip': 'http://127.0.0.1:8080',
        'sit_ip': 'http://218.18.152.81:8030'
    }
    return server_address['sit_ip']
def sql_conf():
    '''
    ip:数据库服务器ip地址
    unsername: 数据库连接用户名
    unsername: 数据库连接密码
    port: 数据库连接的端口
    charset: 连接数据库时字符编码格式,注：utf8
    :return: host, user, password, port, database, chartset
    '''
    #数据库连接信息保存在列表里
    # host = '127.0.0.1'
    # user = 'root'
    # password = '123456'
    # port = 3306
    # database = 'test'
    # chartset = 'utf8'
    host, user, password, port, database, charset = [server_id(),'root','123456',3306,'test','utf8']
    return host, user, password, port, database, charset
if __name__ == '__main__':
    print(sql_conf())